package com.zt.event.service.status.event;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.SpringApplicationEvent;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author system
 */
public class CustomsApplicationStartedEvent extends SpringApplicationEvent {

    private final ConfigurableApplicationContext context;

    private final  long costTime;
    /**
     * {@link CustomsApplicationStartedEvent}
     * @param application
     * @param args
     * @param context
     * @param costTime
     */
    public CustomsApplicationStartedEvent(SpringApplication application, String[] args,
                                   ConfigurableApplicationContext context,long costTime) {
        super(application, args);
        this.context = context;
        this.costTime = costTime;
    }

    /**
     * Return the application context.
     * @return the context
     */
    public ConfigurableApplicationContext getApplicationContext() {
        return this.context;
    }



    public long getCostTime() {
        return this.costTime;
    }

}
